import bianliang from"./bianliang.js";
class BackGround{
	constructor() {
	    this.x= 0 ;
		this.y = 0;
		this.img = bianliang.resObj[0];
	}
	
	move(){
		this.y+=2.5;
		if(this.y>=0){
			this.y = -850;
		}
	}
	//定义一个方法，让他去画到屏幕上去
	//class里面对象不用function
	draw(ctx){
		this.move();
		ctx.drawImage(this.img,this.x,this.y);
	}
}

//最后导出这个对象
export default BackGround;